<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center myjinpai_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub myjinpai_fd0_0'>
					<view class='flex flex-wrap align-center myjinpai_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  myjinpai_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='myjinpai_fd0_0_c1_c0'>我的竞拍</text>
					</view>
					<view class='flex flex-wrap align-center justify-end myjinpai_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center">
				<view>
					<benben-flex-tabs class-name='myjinpai_benbenTabsfd1_0' v-model="tabsTypefd1_0"
						ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0"
						:open-title-type='false' :open-sticky='true' :top='0' :is-show-content='false'
						:scrollspy='false' :tabs-info.sync="tabsInfofd1_0" @change="tabschange">
						<scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
							class="benben-tabs" style="width:750rpx" :scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
							<view class="benben-tabs-content" id="benben_tabsfd1_0-content">
								<view id="benben_tabsfd1_0-title"
									class="benben-tabs-title flex flex align-center justify-around">
									<view
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '1', 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">
										<text>竞拍中</text>
									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '2', 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">
										<text>被超越</text>
									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '3', 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = '3'" :id="`benben_tabsfd1_0-title-item-${'3'}`">
										<text>正展示</text>
									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '4', 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = '4'" :id="`benben_tabsfd1_0-title-item-${'4'}`">
										<text>已过期</text>
									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '5', 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = '5'" :id="`benben_tabsfd1_0-title-item-${'5'}`">
										<text>竞拍失败</text>
									</view>
									<view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '', 'flex ': true }"
										@tap="tabsTypefd1_0 = ''" :id="`benben_tabsfd1_0-title-item-${''}`">
									</view>
								</view>
								<view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line myjinpai_linefd1_0"></view>
							</view>
						</scroll-view>
					</benben-flex-tabs>
				</view>
				<template v-for='(item,key0) in auctionList'>
					<view class='flex flex-wrap align-center justify-center myjinpai_fd1_1' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/shouye/jinpaidetail/jinpaidetail?aid=${item.aid}&status=${tabsTypefd1_0}`" :key='key0'>
						<view class='flex flex-wrap align-center justify-between myjinpai_fd1_1_c0'>
							<view class='flex flex-direction align-stretch'>
								<view class='flex flex-wrap align-center myjinpai_fd1_1_c0_c0_c0'>
									<text>竞拍日期：</text>
									<text>{{item.riqi}}</text>
								</view>
								<view class='flex flex-wrap align-center myjinpai_fd1_1_c0_c0_c1'>
									<text class='myjinpai_fd1_1_c0_c0_c1_c0'>竞拍区域：</text>
									<text>{{item.province}}{{item.city}}</text>
								</view>
							</view>
							<view class='flex flex-wrap align-center' @click.stop="delateclick(item.aid,key0)" v-if="tabsTypefd1_0==4||tabsTypefd1_0==5">
								<text style="color: #FD0100;">删除</text>
								<!-- <text class='fu-iconfont2  myjinpai_fd1_1_c0_c1_c0'>&#xe7f2;</text> -->
							</view>
						</view>
					</view>
				</template>
				<!-- <view class="jinpai_btn" v-if="tabsTypefd1_0==5" @click="jinpainew">
					<text>重新竞拍</text>
				</view> -->
				<view class="noshuju" v-if="auctionList.length==0">
					<image src="../../../static/empty/order.png" mode=""></image>
				</view>
			</view>
			<!---flex布局flex布局结束-->
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"tabsTypefd1_0": "1",
				"auctionList": []
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getur65bdb696b36b2Func()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//我的竞拍列表
			async getur65bdb696b36b2Func() {
				//请求方法
				//数据验证
				let dataauctionList = await this.$api.post(global.apiUrls.post65bdb696b36b2, {
					status:this.tabsTypefd1_0,
				});

				if (dataauctionList.data.code != 1) {
					this.$message.info(dataauctionList.data.msg);
					return
				}
				let infoauctionList = dataauctionList.data;
				this.auctionList = infoauctionList.data
			},
			
			//tabs切换
			tabschange(){
				this.getur65bdb696b36b2Func();
			},
			
			//重新竞拍
			jinpainew(){
				uni.navigateTo({
					url:"/pages/shouye/canyujinpai/canyujinpai"
				})
			},
			
			//删除
			delateclick(aid,index){
				this.$api.post(global.apiUrls.post6607ca66a5739, {
					aid:aid,
				}).then(res=>{
					if(res.data.code==1){
						this.$message.info("删除成功")
						this.auctionList.splice(index,1)
					}else{
						this.$message.info(res.data.msg)
					}
				});
			}
		}
	};
</script>
<style lang="scss" scoped>
	.jinpai_btn{
		width: 100%;
		height: 88rpx;
		background-color: #26BF01;
		position: fixed;
		left: 0;
		bottom: 0;
		text-align: center;
		line-height: 88rpx;
		color: #fff;
		font-size: 32rpx;
	}
	.noshuju{
		width: 100%;
		overflow: hidden;
	}
	.noshuju image{
		width: 300rpx;
		height: 300rpx;
		display: block;
		margin: 100rpx auto;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #eeeeee;
		background-size: 100% auto;
	}

	.myjinpai_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.myjinpai_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		line-height: 50rpx;
	}

	.myjinpai_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.myjinpai_fd0_0_c0 {
		width: 120rpx;
	}

	.myjinpai_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.myjinpai_fd1_1_c0_c1_c0 {
		color: rgba(187, 187, 187, 1);
	}

	.myjinpai_fd1_1_c0_c0_c1_c0 {
		text-align: center;
	}

	.myjinpai_fd1_1_c0_c0_c1 {
		color: #1A1A1A;
		font-size: 28rpx;
		font-weight: 500;
		margin: 8rpx 0rpx 0rpx 0rpx;
	}

	.myjinpai_fd1_1_c0_c0_c0 {
		color: #1A1A1A;
		font-size: 28rpx;
		font-weight: 500;
	}

	.myjinpai_fd1_1_c0 {
		width: 702rpx;
		height: 150rpx;
		margin: 0rpx 0rpx 0rpx 0rpx;
	}

	.myjinpai_fd1_1 {
		border-top: 1px solid rgba(187, 187, 187, 1);
		background: rgba(255, 255, 255, 1);
		width: 100%;
		background-size: 100% auto;
	}

	.myjinpai_linefd1_0 {
		background: rgba(38, 191, 1, 1);
		width: 100rpx;
		height: 8rpx;
		top: 80rpx;
		background-size: 100% auto !important;
	}

	.checkTitlefd1_0 {
		font-weight: 700 !important;
		font-size: 32rpx !important;
		color: #26BF01 !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .myjinpai_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 90rpx;
		white-space: nowrap;
		text-align: center;
		font-size: 32rpx;
	}
</style>